{extend name='layout/base' /}
{block name='title'}系统设置{/block}
{block name='contentHeader'}
<h1>
    系统设置
    <small>注册是否开启</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 系统设置</a></li>
    <li class="active">注册是否开启</li>
</ol>
{/block}
{block name='content'}
<script src="__PLUGIN__/iCheck/icheck.min.js"></script>
<link rel="stylesheet" href="__PLUGIN__/iCheck/all.css">
<script src="__PLUGIN__/layer/layer.js"></script>
<link rel="stylesheet" href="__PLUGIN__/layer/skin/default/layer.css">
<!-- Horizontal Form -->
<div class="box box-info" style="width:90%;margin: 0 auto;">
    <div class="box-header with-border">
        <h3 class="box-title">系统参数</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" action="" method="post">
        <div class="box-body">
            <div class="form-group">
                <label for="reg_on" class="col-sm-2 control-label">注册是否开启</label>
                <div class="col-sm-10">
                    <label>
                        <input type="radio" name="reg_on" value="0" class="minimal" {eq name="$system.reg_on" value="0"}checked{/eq}> 关闭
                    </label>
                    <label>
                        <input type="radio" name="reg_on" value="1" class="minimal" {$system.reg_on =='1' ? 'checked':''}> 开启
                    </label>
                </div>
            </div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <input type="hidden" name="__token__" value="{$Request.token}" />
            <button type="reset" class="btn btn-default">重置</button>
            <!--<button type="submit" class="btn btn-info pull-right">提交</button>-->
            <a href="javascript:;" id="empty" class="btn btn-info pull-right">提交</a>
        </div>
        <!-- /.box-footer -->
    </form>
</div>
<script type="text/javascript">
    //jQuery代码
    $(function () {
        //iCheck for checkbox and radio inputs
        $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
            checkboxClass: 'icheckbox_minimal-blue',
            radioClass: 'iradio_minimal-blue'
        });

        //给查看按钮绑定点击事件
        $('#empty').on('click',function(){
            layer.confirm('您确定要设置该选项？', {
                btn: ['确定','取消'] //按钮
            }, function(){
                $('form').submit();
            }, function(){
                layer.closeAll('dialog');
            });
        });
    });
</script>
{/block}